package com.llt;

import com.llt.utils.EmailUtil;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

@SpringBootTest
public class Mail {
    @Autowired
    private EmailUtil emailUtil;
    @Test
    void mail(){
//        emailUtil.sendSimpleMail("229236940@qq.com");
    }
    @Test
    void regexMail(){

        String regEx1 = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
        Pattern p;
        Matcher m;
        p = Pattern.compile(regEx1);
        m = p.matcher("123@163.cn");
        System.out.println(m.matches());
    }
}
